package com.zzj.controller;


import com.zzj.bean.AreaBean;
import com.zzj.service.AreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("area")
@Api
@CrossOrigin
public class AreaController {
    @Resource
    private AreaService areaService;

    @ApiOperation("或得市对应的所有区")
    @GetMapping("getAreaByCid/{cid}")
    public List<AreaBean> getAreaByCid(@PathVariable("cid") Integer cid){
        return areaService.getAreaByCid(cid);
    }

}
